﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class sysManage_KaoQinInfo : System.Web.UI.Page
{
    public string username;
    public string Ontutytime;
    public string OffdutyTime;
    public string CheckDate;
    public string OntutyState;
    public string OffDutyState;
    public string OntutyWhys;
    public string OffWhys;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int OndutyId = Convert.ToInt32(Request["OndutyId"].ToString());
            SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["Connection"]);
            con.Open();
            string sql = "select * from [Check]  where OndutyId="+OndutyId+"";
            SqlCommand com = new SqlCommand(sql,con);
            SqlDataReader dr = com.ExecuteReader();
            if (dr.Read())
            {
                username = dr["username"].ToString();
                Ontutytime = dr["Ontutytime"].ToString();
                OffdutyTime = dr["OffdutyTime"].ToString();
                CheckDate = dr["CheckDate"].ToString();
                OntutyState = dr["OntutyState"].ToString();
                OffdutyTime = dr["OffdutyTime"].ToString();
                OntutyWhys = dr["OntutyWhys"].ToString();
                OffWhys = dr["OffWhys"].ToString();
            }
            con.Close();
        }
    }
}
